package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 【请填写功能名称】对象 coupon
 * 
 * @author ruoyi
 * @date 2024-09-02
 */
public class Coupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 优惠券id */
    private Long id;

    /** 状态(1正常，2是关闭） */
    @Excel(name = "状态(1正常，2是关闭）")
    private Long status;

    /** 类型:1是折扣优惠券，2是满减 */
    @Excel(name = "类型:1是折扣优惠券，2是满减")
    private Long type;

    /** 优惠值 :折扣值比如8折，满减值减20 */
    @Excel(name = "优惠值 :折扣值比如8折，满减值减20")
    private Long value;

    /** 最低消费金额 */
    @Excel(name = "最低消费金额")
    private Long minimumSpend;

    /** 最高消费金额 */
    @Excel(name = "最高消费金额")
    private Long maximumSpend;

    /** 有效天数 */
    @Excel(name = "有效天数")
    private Long day;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 兑换码 */
    @Excel(name = "兑换码")
    private String code;

    /** 库存：-1为不限量 */
    @Excel(name = "库存：-1为不限量")
    private Long stock;

    /** 关联的商品id，-1为所有商品可用 */
    @Excel(name = "关联的商品id，-1为所有商品可用")
    private Long goodsId;

    /** 关联的商品类型，-1为所有商品可用 */
    @Excel(name = "关联的商品类型，-1为所有商品可用")
    private Long goodsType;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 使用规则 */
    @Excel(name = "使用规则")
    private String rule;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }
    public void setType(Long type) 
    {
        this.type = type;
    }

    public Long getType() 
    {
        return type;
    }
    public void setValue(Long value) 
    {
        this.value = value;
    }

    public Long getValue() 
    {
        return value;
    }
    public void setMinimumSpend(Long minimumSpend) 
    {
        this.minimumSpend = minimumSpend;
    }

    public Long getMinimumSpend() 
    {
        return minimumSpend;
    }
    public void setMaximumSpend(Long maximumSpend) 
    {
        this.maximumSpend = maximumSpend;
    }

    public Long getMaximumSpend() 
    {
        return maximumSpend;
    }
    public void setDay(Long day) 
    {
        this.day = day;
    }

    public Long getDay() 
    {
        return day;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setStock(Long stock) 
    {
        this.stock = stock;
    }

    public Long getStock() 
    {
        return stock;
    }
    public void setGoodsId(Long goodsId) 
    {
        this.goodsId = goodsId;
    }

    public Long getGoodsId() 
    {
        return goodsId;
    }
    public void setGoodsType(Long goodsType) 
    {
        this.goodsType = goodsType;
    }

    public Long getGoodsType() 
    {
        return goodsType;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setRule(String rule) 
    {
        this.rule = rule;
    }

    public String getRule() 
    {
        return rule;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("status", getStatus())
            .append("type", getType())
            .append("value", getValue())
            .append("minimumSpend", getMinimumSpend())
            .append("maximumSpend", getMaximumSpend())
            .append("day", getDay())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .append("code", getCode())
            .append("stock", getStock())
            .append("goodsId", getGoodsId())
            .append("goodsType", getGoodsType())
            .append("title", getTitle())
            .append("rule", getRule())
            .toString();
    }
}
